# nginx.sh
#root@ubuntu:/home/wuchunlong# ./nginx_3.sh

#! /bin/sh
apt-get install -y gcc
apt-get install -y libpcre3 libpcre3-dev
apt-get install -y zlib1g zlib1g-dev
apt-get install -y openssl 
apt-get install -y libssl-dev

# 如果你是从Windows拖压缩包到Linux，需要安装 lrzsz
apt-get -y install lrzsz
tar -xvf nginx-1.18.0.tar.gz
cd nginx-1.18.0

# 先把编译安装一下

apt-get install -y make

# 执行安装命令
./configure \
--prefix=/usr/local/nginx \
--sbin-path=/usr/local/nginx/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
&& make \
&& make install
nginx -v
